package com.zpark.utils;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @PackageName: com.zpark.hystrix.utils
 * @ClassName: JsonResult
 * @Description:
 * @author: RZS
 * @date: 2022/11/29  11:22
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@Slf4j
public class JsonResult<T> {
    @JsonInclude(value = Include.ALWAYS)
    private Integer code;// 状态码
    @JsonInclude(value = Include.NON_NULL)
    private String message;// 状态信息
    @JsonInclude(value = Include.ALWAYS)
    private T data;// 响应数据

//    public JsonResult(Integer code, String message, T data) {
//        this.code = code;
//        this.message = message;
//        this.data = data;
//    }
}
